package net.mujiwulian.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author: silence
 * @Description:
 * @Date:Create：in 2019/12/30 12:58
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "document")
public class Document implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "title")
    private String title;

    @TableField(value = "type")
    private String type;

    @TableField(value = "cover_url")
    private String coverUrl;

    @TableField(value = "author")
    private String author;

    @TableField(value = "content")
    private String content;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private MultipartFile cover;
}
